Determine how many bits are in a floating point value
You should do the output in main(), not in countbits().  Functions should have only one primary purpose, according to the Single Responsibility Principle (SRP).  In this case, countbits() should just perform the calculations and return the result.  Thus, its return type should now be of type int.

Inside of countbits(), you could just loop while k is not 0 instead of looping 32 times.  Once all the bits in k shift away and k becomes 0, there's no point in continuing.  This will also give you a result of 0 right away if the input is 0; calculating this will be a waste of time.

int main(void) {
    int input;

    // get the input...

    int count = countbits(input);

    printf("%d has %d bits set\n", input, count);
}

int countbits(int k) {
    int count = 0;

    while (k != 0) {
        // perform calculations...
    }

    return count;
}


Some notes about this and other things:


main() should have a void parameter since it isn't taking any command line arguments.
The first (unformatted) output in main() should use puts() instead of printf().
count doesn't need to be declared and then assigned to 0.  Just initialize it to 0.
j should be initialized inside the for loop statement (if you have C99).  If you don't, then declare it right before the loop.  Variables should be used as close in scope as possible.