If all you want is counting the number of bits set in a large array of bytes, there is no need to perform bit operations at all: all it takes is a magic array that converts all possible byte values to the number of bits set in that byte value.
int[] bitsSet=new int[256] {0,1,1,2, 1,2,2,3, 1,2,2,3, 2,3,3,4 ...};
There are many ways to come up with the correct values for this array:
1. simply counting bits using bit operations;
2. constructing the array dynamically, e.g. using 8 nested for loops, each representing one bit being clear or set;
3. detecting a repetition in the number pattern;
4. using recursion.
Whatever you choose, once the bitsSet array is available, you'll get way more performance out of it, as you are taking care of 8 bits at a time by using a simple array lookup and one addition.
:)