An approximation algorithm for #k-SAT