Count all the NPC's command?

[LUA]
local PointsToGive = // for example ALL NPC’s +10

timer.Create( “GivePoints”, 300, 0, function()
for k, v in ipairs( player.GetAll() ) do
v:GivePoints( PointsToGive )
v:PrintMessage( HUD_PRINTTALK, “[PAIDAY!]Every NPC is money, here are your … points”);
end
end )
[/LUA]

i have problems with line one, i can’t find a command that count all npc’s,
and with the last line that need to tell the user howmany points he got.

Thanks,

If you want to count all alive npcs than use this:
[lua]

timer.Create( “GivePoints”, 300, 0, function()
local aliveNPCs = #ents.FindByClass( “npc_*” )

for k, v in ipairs( player.GetAll() ) do
    v:GivePoints( aliveNPCs )
    v:PrintMessage( HUD_PRINTTALK, "[PAIDAY!]Every NPC is money, here are your " .. tostring( aliveNPCs ) .. " points");
end

end )

[/lua]

works, thankyou MDave!