Add popcount implementation for count().