If it is possible, I would like to write a script that tells me how many times a user logs onto a PC. If this user logs on to the PC for more than X times and it is not assigned to him/her and he/she is not an admin a popup warns the user that the account will be locked if steps are not taken to have the PC assigned to them.
It sounds like you want some kind of reservation type software, like PC Reservation. However, I don't think you actually want to do what you say you do. Could you not achieve something similar using built in domain control like restricting log ons to times of the day? You could use group policy to control what groups can log into a computer as well. Setting the number of times someone could log in by any means could be bad. What if you allowed 6 logins, but on the 5th it crashes and they have to reboot?
To entertain your direct question, I suppose you could by some means of a silent login script that fetched some spreadsheet/cvs/etc that updated stats based on logging in. You would need to find or write such a script. This is not something that you typically see done, or Microsoft probably would have designed native functionality for this by now. This is why I encourage you to reconsider your goal and means of achieving it. Maybe your topology simply needs changed. That along with proper access controls can go a long way.