[math-fun] Counting problem solved