Substite Category Slug in a Shortcode

Try this:

<?php echo do_shortcode('[category_post_count category='.$css_slug.']'); ?>

I’m not sure what you’re trying to do though? If you’re not doing this in actual content pages, you don’t need the shortcode.

You could just do it all within the php page. Let me know if you need more info.