How to create a plugin that notifies for updates?

There is a plugin for that: Automatic Updates For Private And Commercial Plugins.

To prevent upgrade checks against the WordPress.org data base in your plugin use the function Mark Jaquith has written.