I also suggest checking site:example.com -- without the www. You may discover if your site is being indexed in two different ways and then take steps to stop that from happening. (this search will also show the with-www urls.)
I used http://www.example.com and only the home page of my site came up. Does this mean google hasn't accessed my other pages? If so why? When I entered site:example.com all my pages were listed. You said that this means the site is being accessed twice and should be stopped. Can you please explain also what this means. Thanks
Just in case no one said this yet, Welcome to WebmasterWorld!
Technically, http://www.example.com and http://example.com are two different sites. So, to prevent the SE's from thinking that you're running two sites with duplicate content (which can lead to one or both not performing well in the SERP's, backlinks split by coming into two different sites, and lesser problems) you need to permanently redirect all of the pages on one version of the site, to all the pages on the other version of the site, i.e., all non-www pages to their www counterparts, or the other way 'round.