1. If it doesn't get you in trouble, it isn't sex. If your partner is not bothered by you giving someone else a bj or hj, it isn't sex.
2. If your sexual input of any kind, up to intercourse, gives the other person no pleasure whatsoever, it is not sex.