So are you looking for a query that finds a user within 3 hops, but doesn't continue expansion once it encounters a user node? In that case you may need to add a predicate to ensure you filter out such results:
MATCH path = (u:User {uid: $uid})-[*1..3]-(t:User)
WHERE single(node in tail(nodes(path)) WHERE node:User)
RETURN count(DISTINCT t)