Start | Run, type : regedit
HKEY_CURRENT_USER | Software | Microsoft | Windows | CurrentVersion | Explorer | Advanced
double click at "TaskbarGlomming" and gives the value 1.
After that, make a new DWORD value "Edit | New | DWORD Value" and name it as "TaskbarGroupSize".
Double click at this new value and in column "value" gives the maximum value as you want. For example if you type in 4, then after 4 same windows opened, your OS will combined them all into one taskbar.
This is how it should looks like after you open 5 same windows
The last thing you must do is to Restart your PC so the new change will takes effect