Approximate Model Counting by Partial Knowledge Compilation