TIME spent as an asylum seeker does NOT count towards Spanish Nationality.
However, as soon as you become a RESIDENT, any residence (Humanitarian Reasons, Arraigos, Community Relatives, etc...), then yes, the legal time necessary for you to be able to apply for Spanish nationality begins to run out.
Besides, being Venezuelan or having an Ibero-American nationality, you only need TWO YEARS of Legal Residence to be eligible to have the 3rd most powerful Passport in the World.
If you are granted asylum (not for humanitarian reasons but for approved asylum), then the time you spent as an applicant will be taken into account for nationality.