One of those "it depends" situations:
14 CFR 61.109(l)
(l)
Permitted credit for flight training received from a flight instructor with a sport pilot rating. The holder of a sport pilot certificate may credit flight training received from a flight instructor with a sport pilot rating toward the aeronautical experience requirements of this section if the following conditions are met:
(1) The flight training was accomplished in the same category and class of aircraft for which the rating is sought;
(2) The flight instructor with a sport pilot rating was authorized to provide the flight training; and
(3) The flight training included either—
(i) Training on areas of operation that are required for both a sport pilot certificate and a private pilot certificate; or
(ii) For airplanes with a VH greater than 87 knots CAS, training on the control and maneuvering of an airplane solely by reference to the flight instruments, including straight and level flight, turns, descents, climbs, use of radio aids, and ATC directives, provided the training was received from a flight instructor with a sport pilot rating who holds an endorsement required by
§ 61.412(c).