Counting BPS operators in N=4 SYM