Best guess
Sub Test()
Dim r As Range
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Application.ScreenUpdating = False
Set ws1 = Sheets("U4340598")
Set ws2 = Sheets("Count")
With ws2
Set r = Range(.Cells(2, 1), .Cells(Rows.Count, 1).End(xlUp))
End With
Set Rng = ws1.Columns(12).SpecialCells(2)
For Each cel In r
x = ws2.Cells.Find(cel).Offset(, 1).Value
i = Rng.Find(cel, after:=Rng(1), searchdirection:=xlNext).Row
j = Rng.Find(cel, after:=Rng(1), searchdirection:=xlPrevious).Row
If (j - i) > x Then
ws1.Cells(i, 12).Offset(x).Resize(j - i - x + 1).EntireRow.Delete
ElseIf (j - i + 1) < x Then
ws1.Cells(j + 1, 12).Resize(x - (j - i) - 1).EntireRow.Insert
ws1.Cells(i, 12).Resize(x - (j - i) - 1).EntireRow.Copy ws1.Cells(j + 1, 1)
End If
Application.CutCopyMode = False
Next cel
Application.ScreenUpdating = True
End Sub