count the elements