The electrochemical behavior of a system with a limited number of molecules