Here is the verilog code for counting number of 1's and number of 0's in parallel data. since data is continuously changing on every clock cycle, counting has to be done using parallel hardware.
initial $monitor("data = %b, num of zero = %d, num_of_one = %d ", count , zero, one);
data = 0000000000, num of zero = 10, num_of_one = 0
data = 0100010001, num of zero = 7, num_of_one = 3
data = 1000100010, num of zero = 7, num_of_one = 3
data = 1100110011, num of zero = 4, num_of_one = 6
data = 0001000100, num of zero = 8, num_of_one = 2
data = 0101010101, num of zero = 5, num_of_one = 5
data = 1001100110, num of zero = 5, num_of_one = 5
data = 1101110111, num of zero = 2, num_of_one = 8
data = 0010001000, num of zero = 8, num_of_one = 2
data = 0110011001, num of zero = 5, num_of_one = 5
data = 1010101010, num of zero = 5, num_of_one = 5
data = 1110111011, num of zero = 2, num_of_one = 8
data = 0011001100, num of zero = 6, num_of_one = 4
data = 0111011101, num of zero = 3, num_of_one = 7
data = 1011101110, num of zero = 3, num_of_one = 7
data = 1111111111, num of zero = 0, num_of_one = 10
data = 0100010000, num of zero = 8, num_of_one = 2
data = 1000100001, num of zero = 7, num_of_one = 3
data = 1100110010, num of zero = 5, num_of_one = 5
data = 0001000011, num of zero = 7, num_of_one = 3
data = 0101010100, num of zero = 6, num_of_one = 4
data = 1001100101, num of zero = 5, num_of_one = 5
data = 1101110110, num of zero = 3, num_of_one = 7
data = 0010000111, num of zero = 6, num_of_one = 4
data = 0110011000, num of zero = 6, num_of_one = 4
data = 1010101001, num of zero = 5, num_of_one = 5
data = 1110111010, num of zero = 3, num_of_one = 7
data = 0011001011, num of zero = 5, num_of_one = 5
data = 0111011100, num of zero = 4, num_of_one = 6
data = 1011101101, num of zero = 3, num_of_one = 7
data = 1111111110, num of zero = 1, num_of_one = 9
data = 0100001111, num of zero = 5, num_of_one = 5
data = 1000100000, num of zero = 8, num_of_one = 2
data = 1100110001, num of zero = 5, num_of_one = 5
data = 0001000010, num of zero = 8, num_of_one = 2
data = 0101010011, num of zero = 5, num_of_one = 5
data = 1001100100, num of zero = 6, num_of_one = 4
data = 1101110101, num of zero = 3, num_of_one = 7
data = 0010000110, num of zero = 7, num_of_one = 3
data = 0110010111, num of zero = 4, num_of_one = 6
data = 1010101000, num of zero = 6, num_of_one = 4
data = 1110111001, num of zero = 3, num_of_one = 7
data = 0011001010, num of zero = 6, num_of_one = 4
data = 0111011011, num of zero = 3, num_of_one = 7
data = 1011101100, num of zero = 4, num_of_one = 6
data = 1111111101, num of zero = 1, num_of_one = 9
data = 0100001110, num of zero = 6, num_of_one = 4
data = 1000011111, num of zero = 4, num_of_one = 6
data = 1100110000, num of zero = 6, num_of_one = 4
data = 0001000001, num of zero = 8, num_of_one = 2
data = 0101010010, num of zero = 6, num_of_one = 4
data = 1001100011, num of zero = 5, num_of_one = 5
data = 1101110100, num of zero = 4, num_of_one = 6