What kind of flight counts toward the commercial 100 nautical mile cross-country flight requirement?
Your question didn't give enough information for a 100% correct answer, so I'm going to make a few assumptions:


You are asking about FAA certification in the USA
You are asking about part 61 training, not part 141, 142, or anything else
You're asking about a single-engine commercial rating (this one is less important than the other two)


With those assumptions in mind, the controlling regulation is 61.169(A)(3)(iii-iv), which says (emphasis added):

(iii) One 2-hour cross country flight in a single engine airplane in daytime conditions that consists of a total straight-line distance of more than 100 nautical miles from the original point of departure;

(iv) One 2-hour cross country flight in a single engine airplane in nighttime conditions that consists of a total straight-line distance of more than 100 nautical miles from the original point of departure;

So you need to ask yourself:


Did you fly at least 2 hours?
Did you land at an airport at least 100 miles away from the original point of departure?
Did you do the entire flight during the day/night?


If so then you're good.  If not then no.