If I remember correctly, this is how Intel CPUs that have a special feature called "multithreading" (I think) works. In fact, it's a technology that allows each core to function as two cores. So for every core you have, you have another emulated core. So yes, your CPU indeed have 10 cores, but because each one emulates an extra one, you end up with 20 cores in the Task Manager. The information shown in the command prompt is the actual number of real core inside your CPU, while the one showing in the Task Manager is the number of total cores (physical and virtual) your CPU can and use.
Hopefully that answers your question.