Most of the courses that I've seen explicitly state that you obtain no credit for doing the course. More explicitly, they may offer certificates of completion, but these certificates do not convey academic credit. For example, from Coursea's Term's of Service:
This Letter of Completion, if provided to you, would be from Coursera and/or from the instructors. You acknowledge that the Letter of Completion, if provided to you, may not be affiliated with Coursera or any college or university. Further, Coursera offers the right to offer or not offer any such Letter of Completion for a class. You acknowledge that the Letter of Completion, and Coursera’s Online Courses, will not stand in the place of a course taken at an accredited institution, and do not convey academic credit.
So the short answer is that you will be unlikely to obtain such credit. Certainly, read the terms of service to be sure. Nevertheless, you could add such things to your CV to demonstrate your interest in a particular field.