Andrew,
The first can be accomplished on your lines tab within Administrator - just set the maximum inbound calls to 10 less than your maximum available lines - all calls beyond that should be rejected (I think they'll receive a congestion tone on the caller side, I don't recall offhand).
[ATTACH]596[/ATTACH]
The second can be accomplished completely via Attendant by using Queue Operations, advanced workgroup options and logical transfers. Advanced operations are only available on ACD groups, however. There are other more obscure and undocumented methods to deal with station groups and non-acd workgroups to accomplish things, too.
Specifically, you can test for queue statistics via the Logical Transfer step within Attendant, which you're already familiar with but may not have fully explored yet:
[ATTACH]597[/ATTACH]
Overall though, it seems like your system could benefit from an analysis of your needs and a tailored solution to meet those needs. If you're trying to do things in handlers without taking the more efficient route of Attendant and Queue operations when they're available, I'm curious what else could have been done with the built in tool set that is now done with custom handlers...
The company I work for just happens to do those very things, if you are interested. :)
Our website can be found here:
http://www.emergentnetworks.com/
I hope this helps to save you a few hours of handler work. I know how it feels to spend hours on a handler or set of handlers, only to discover I simply reinvented the proverbial wheel... :)
-Kevin
P.S. I'll have to write something up when I get a moment to demonstrate the timer function I mention, it's an old trick really. I didn't miss it, I just don't have time to load up Designer just now and bang it out (on my way out the door to go home in this lovely white mess falling from the sky.) :)