Hi, I've read your job description and understood your attached code as well. I can help with this task because I've 5+ years of experience using C++ for various low-level applications.
Right now, your code is basically counting the number of '1's in the binary equivalent of the number the user inputs to the code. If you want to count the total number of bits in that number, you don't have to do anything as it's already fixed for every datatype being used based on the underlying architecture. On most architectures it's 32-bit.
Please let me know if I'm missing anything and share further details about what needs to be done here. I'll be looking forward to working with you on this task. Thanks.