Counting primitive points of bounded height