An ion transfer model for contact charging