Can training for a sport pilot be used towards a private pilot certificate in the same category?

Yes, your time as a sport pilot does count towards your total flight time hours. Only the hours (5 minimum) of solo time that take place prior to becoming a certificated sport pilot will not count towards higher ratings, unless you have been solo endorsed by a sub part H CFI. However, this restriction is lifted once you become a certificated sport pilot. If building flight hours is a goal for you it often makes sense to buy an inexpensive ELSA aircraft and use it to build your log book flight time as a sport pilot. Imagine the savings while building say a thousand hours towards your first commercial pilot position . Operating your own aircraft that cost around $20,000 to purchase and has minimal expense to maintain and that only burns 4-6 gallons per hour of automotive grade pump gasoline. Those thousand hours could cost you as little as $40 per hour to acquire as opposed to the $150- $250 per hour in a rental airplane or larger certificated airplane that you may own.