How to store number of scanned symbols in a variable in amibroker?

My code scans for symbols which meets certain criteria at market opening time. How can I store the number of symbols which meets criteria in a variable?

Look at StaticVarAdd() or StaticVarSet() in the Help file. You could probably also use AddToComposite(), depending on your goals.