The basic setup could be something like: streamer logs into your bot application (web or other) using their Twitch account, your bot looks for that registration event, joins their Twitch channel, and starts logging viewership.
The point system design would be up to you (e.g. X points per minute idle; +20% for X minutes when someone is actively chatting; 500 bonus points on cheer; 1000 on sub, etc. etc.).
Differentiating between streamers is simply differentiating which chat room your bot is in. Viewers is trickier as there isn’t a supported way to get a viewer list. There is an unsupported way to get a chatters list that many bots rely on. You can search and find it on these forums.
Hope that helps a bit!