I mean, is there any automatic way to know how many .esp plugins are active and using one of the 250+ slots?}

I have checked by vortex, wrye bash and loot, but it seems they count every mod, including .esl, .esps flagged as .esls, and even mods without plugins.

I just want to know how many mod slots I have available.

What I do is,

Click on the plugins tab

In the FLAGS Column, I pick "LIGHT", now it's only showing the ESLs and ESL flagged ESPS, and the filter in the Orange Bar that shows after you choose that option says

"This table is filtered, showing 21/258 items"

So then I just subtract 21 from 255, and that's how many slots for ESPs I have left.

Sorry for being late to the party, but if Vortex shows 21 Light Plugins out of the 258 items you have, wouldn't that mean that the remaining 237 that are not ESL or ESL Flagged ESPs are actually ESP ?

If that's correct, that'd mean you should substract 237 from 255 (not 21 from 255), thus leaving you with 18 available slots for ESP (instead of 234 slots).

Am I making mistakes somewhere ?

Yes, the mistake you're making is subtracting 21 from 258 instead of 255.

255 is the MOST ESPs, that the Game can handle, so you need to know how many ESP slots are available to reach 255, NOT 258

The magic number is 255.

Oh yes I know, don't worry hehe

It's just that in your initial post, you said if you filter and show only the Light plugin, you then substract that number from 255 to know how many slots you have for ESPs.

In your example you had 21 Light plugins and you substracted 21 from 255 to get how many ESP slot you still have (so 234 ESPS, so 21 available slots)

I was saying that it might be better to substract the total number of ESP among all your mods (Total Plugins[258] minus Light Plugins[21]) from 255 instead, in order to get the available number of available slots.

If you have 21 Light Plugins out of 258 plugins, you have a total of 237 ESPs already, so 255 minus 237 = 19 available slots (instead of 21)

I know the difference is only of 2 ESP though

EDIT : In other words, in your example you took 255 and substracted the number of Light Plugins you have, instead of substracting the number of non-flagged ESPs you already have.